package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dao.User_dao;
import entity.User;
import service.User_service;

@Service
public class User_service_impl implements User_service {
	
	@Autowired
	private User_dao user_dao;
	
	public boolean saveUser(User user) {
		
		return user_dao.saveUser(user);
	}

	public boolean deleteByid(Integer id) {
		
		return user_dao.deleteByid(id);
	}

	public boolean updateUser(User user) {
		
		return user_dao.updateUser(user);
	}

	public User getUserByName(String username) {
		// TODO Auto-generated method stub
		return user_dao.getUserByName(username);
	}

	public User getUser(String username, String password) {
		// TODO Auto-generated method stub
		return user_dao.getUser(username, password);
	}

	public List<User> user_list() {
		// TODO Auto-generated method stub
		return user_dao.user_list();
	}

}
